#!/bin/sh
[ -z "$DOCUMENT_ROOT" ] && export DOCUMENT_ROOT=$(main.sbin www_root)
start()
{
$DOCUMENT_ROOT/apps/dnsmasq/dnsmasq.sbin gen_blockdomains
/etc/init.d/dnsmasq restart 2>&1 >/dev/null
}
stop()
{
$(main.sbin www_root)/apps/dnsmasq/dnsmasq.sbin empty_blockdomains
/etc/init.d/dnsmasq restart 2>&1 >/dev/null
}


case $1 in
start)
start
;;
stop)
stop
;;
restart)
start
;;
esac
